<template>
	<view>
		<leaveList :listInfo="editList"></leaveList>
	</view>
</template>

<script>
	import leaveList from '../template/leaveList.vue'
	import * as api from '../config/api.js'
	export default {
		data(){
			return{
				editList:[]
			}
		},
		components:{
			leaveList
		},
		onLoad() {
			let leaveUserNum = uni.getStorageSync('leaveUserNum')
			let that = this
			api.getStatusByTypeApi(leaveUserNum,0,{
				data:{},
				success:res=>{
					if(res.code == 200){
						// console.log("成功")
						// console.log(res)
						that.editList = res.data
					}else if(res.code == 500){
						uni.showToast({
							title:"暂无数据",
							icon:"none"
						})
					}else{
						uni.showToast({
							title:"请求失败",
							icon:"none"
						})
					}
				},
				fail:err=>{
					console.log(err)
					uni.showToast({
						title:"网络延迟",
						icon:"none"
					})
				}
			})
		}
	}
</script>

<style>
</style>
